package com.chainyoung.common.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class UserInfo implements Parcelable {


    /**
     * username : sabo
     * avatar : http://local.exchange.cn/Upload/head/2018-05/5b0684c7509dd.jpg
     * chatId : PjKnjd9kwSdN73QIfXQc1OUK/AHyrQi16Fa6Atc
     * token : c1e53ce048a321e86517648ab51ec898
     * email : 455462923@qq.com
     * mobile : 17607172615
     * is_setpaypassword : 1
     */

    private String username;
    private String avatar;
    private String chatId;
    private String token;
    private String email;
    private String mobile;
    private int is_setpaypassword;

    private String register_time;
    private String first_trade_time;
    private String last_login_time;
    private String sum_order_num;
    private String finished_order_num;
    private Object coin_deal_nums;


    private String h5_chat_url;
    private String uid;//用户uid
    private String invit;//邀请码
    private int invitCount;//下级人数
    private int invitTotalCount;//下级总人数
    private int unread_msg_num;//消息中心未读消息总数


    protected UserInfo(Parcel in) {
        username = in.readString();
        avatar = in.readString();
        chatId = in.readString();
        token = in.readString();
        email = in.readString();
        mobile = in.readString();
        is_setpaypassword = in.readInt();
        register_time = in.readString();
        first_trade_time = in.readString();
        last_login_time = in.readString();
        sum_order_num = in.readString();
        finished_order_num = in.readString();
        h5_chat_url = in.readString();
        uid = in.readString();
        invit = in.readString();
        invitCount = in.readInt();
        invitTotalCount = in.readInt();
        unread_msg_num = in.readInt();
    }

    public static final Creator<UserInfo> CREATOR = new Creator<UserInfo>() {
        @Override
        public UserInfo createFromParcel(Parcel in) {
            return new UserInfo(in);
        }

        @Override
        public UserInfo[] newArray(int size) {
            return new UserInfo[size];
        }
    };

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getChatId() {
        return chatId;
    }

    public void setChatId(String chatId) {
        this.chatId = chatId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public int getIs_setpaypassword() {
        return is_setpaypassword;
    }

    public void setIs_setpaypassword(int is_setpaypassword) {
        this.is_setpaypassword = is_setpaypassword;
    }


    public String getRegister_time() {
        return register_time;
    }

    public void setRegister_time(String register_time) {
        this.register_time = register_time;
    }

    public String getFirst_trade_time() {
        return first_trade_time;
    }

    public void setFirst_trade_time(String first_trade_time) {
        this.first_trade_time = first_trade_time;
    }

    public String getLast_login_time() {
        return last_login_time;
    }

    public void setLast_login_time(String last_login_time) {
        this.last_login_time = last_login_time;
    }

    public String getSum_order_num() {
        return sum_order_num;
    }

    public void setSum_order_num(String sum_order_num) {
        this.sum_order_num = sum_order_num;
    }

    public String getFinished_order_num() {
        return finished_order_num;
    }

    public void setFinished_order_num(String finished_order_num) {
        this.finished_order_num = finished_order_num;
    }

    public Object getCoin_deal_nums() {
        return coin_deal_nums;
    }

    public void setCoin_deal_nums(Object coin_deal_nums) {
        this.coin_deal_nums = coin_deal_nums;
    }

    public String getH5_chat_url() {
        return h5_chat_url;
    }

    public void setH5_chat_url(String h5_chat_url) {
        this.h5_chat_url = h5_chat_url;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getInvit() {
        return invit;
    }

    public void setInvit(String invit) {
        this.invit = invit;
    }

    public int getInvitCount() {
        return invitCount;
    }

    public void setInvitCount(int invitCount) {
        this.invitCount = invitCount;
    }

    public int getInvitTotalCount() {
        return invitTotalCount;
    }

    public void setInvitTotalCount(int invitTotalCount) {
        this.invitTotalCount = invitTotalCount;
    }

    public int getUnread_msg_num() {
        return unread_msg_num;
    }

    public void setUnread_msg_num(int unread_msg_num) {
        this.unread_msg_num = unread_msg_num;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(username);
        dest.writeString(avatar);
        dest.writeString(chatId);
        dest.writeString(token);
        dest.writeString(email);
        dest.writeString(mobile);
        dest.writeInt(is_setpaypassword);
        dest.writeString(register_time);
        dest.writeString(first_trade_time);
        dest.writeString(last_login_time);
        dest.writeString(sum_order_num);
        dest.writeString(finished_order_num);
        dest.writeString(h5_chat_url);
        dest.writeString(uid);
        dest.writeString(invit);
        dest.writeInt(invitCount);
        dest.writeInt(invitTotalCount);
        dest.writeInt(unread_msg_num);
    }
}
